Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In current dev builds, if you turn on automatic registry refreshing at launch in the settings, you can sometimes end up with the main menu disabled and the close button not working at startup.
Causes
Wait
tab's encapsulation and how it's used, and some of those updates must have created a state where we disable the window and don't re-enable it, but I have not been able to pin down exactly how it happened.Main.SwitchEnabledState
is a toggle that keeps state in a private_enabled
variable, but every place that calls it wants specifically to either enable or disable the window; there is no point where a toggle actually makes sense like it does with a checkbox. If that state gets out of sync unexpectedly, then those calls all flip, we disable when we mean to enable and vice versa, and we end up with a disabled window that can't be re-enabled.Main.SwitchEnabledState
and some enable or disable without it, which would be a great way for_enabled
to get out of syncChanges
Main.SwitchEnabledState
fromMainRepo.cs
is split intoMain.EnableMainWindow
andMain.DisableMainWindow
inMain.cs
, and all calling code is updated to use the right one based on what is being done at that pointMain.EnableMainWindow
andMain.DisableMainWindow
Wait.Finish
andHideWaitDialog
is removedThis fixes the bug and should help keep things more consistent in the future.